//
//  CustomImage.m
//  MapViewTest
//
//  Created by 美鑫科技 on 16/5/10.
//  Copyright © 2016年 MorpLCP. All rights reserved.
//

#import "CustomImage.h"

@implementation CustomImage

+(UIImage *)imageNamed:(NSString *)name{
    NSString *path;
    NSArray *arr = [name componentsSeparatedByString:@"."];
    if (arr.count == 1) {
        path = [[NSBundle mainBundle] pathForResource:name ofType:@"png"];
    } else{
        path = [[NSBundle mainBundle] pathForResource:name ofType:nil];
    }
    UIImage *image = [UIImage imageWithContentsOfFile:path];
    return image;
}

@end
